package cn.yzfy.common.model.dto;

import cn.yzfy.common.base.dto.BaseDTO;
import cn.yzfy.common.validate.ValidateNotChinese;
import cn.yzfy.common.validate.ValidateNotChinese.ValidateNotNullAndEmpty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;


import java.io.Serial;
import java.util.ArrayList;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AddRoleInputDTO extends BaseDTO {
  
  @Serial
  private static final long serialVersionUID = 4216643512169478985L;
  
  @Schema(description = "启用状态 true|false")
  private Boolean enable;
  
  @ValidateNotNullAndEmpty(message = "角色编码不能为空")
  @Schema(description = "角色编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "ADMIN")
  private String code;
  
  @ValidateNotNullAndEmpty(message = "图标不能为空")
  @Schema(description = "图标", example = "i-fe:user")
  private String icon;
  
  @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "超级管理员")
  @ValidateNotNullAndEmpty(message = "角色名称不能为空")
  private String name;
  
  @Schema(description = "描述", example = "拥有系统全部权限")
  private String remark;
  
  @Schema(description = "权限id集合")
  private List<Long> permissionIds = new ArrayList<>();
}